package com.imti.mall.model.order.pojo;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class OmsOrderReturnApply implements Serializable {

    private static final long serialVersionUID = -6677882019316126097L;
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单id")
    private Long orderId;

    @ApiModelProperty(value = "收货地址表id")
    private Long companyAddressId;

    @ApiModelProperty(value = "退货商品id")
    private Long productId;

    @ApiModelProperty(value = "订单编号")
    private String orderSn;

    @ApiModelProperty(value = "申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "会员用户名")
    private String memberUsername;

    @ApiModelProperty(value = "退款金额")
    private BigDecimal returnAmount;

    @ApiModelProperty(value = "退货人姓名")
    private String returnName;

    @ApiModelProperty(value = "退货人电话")
    private String returnPhone;

    @ApiModelProperty(value = "申请状态：0->待处理；1->退货中；2->已完成；3->已拒绝")
    private Integer status;

    @ApiModelProperty(value = "处理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date handleTime;

    @ApiModelProperty(value = "商品图片")
    private String productPic;

    @ApiModelProperty(value = "商品名称")
    private String productName;

    @ApiModelProperty(value = "商品品牌")
    private String productBrand;

    @ApiModelProperty(value = "商品销售属性：颜色：红色；尺码：xl;")
    private String productAttr;

    @ApiModelProperty(value = "退货数量")
    private Integer productCount;

    @ApiModelProperty(value = "商品单价")
    private BigDecimal productPrice;

    @ApiModelProperty(value = "商品实际支付单价")
    private BigDecimal productRealPrice;

    @ApiModelProperty(value = "原因")
    private String reason;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "凭证图片，以逗号隔开")
    private String proofPics;

    @ApiModelProperty(value = "处理备注")
    private String handleNote;

    @ApiModelProperty(value = "处理人员")
    private String handleMan;

    @ApiModelProperty(value = "收货人")
    private String receiveMan;

    @ApiModelProperty(value = "收货时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiveTime;

    @ApiModelProperty(value = "收货备注")
    private String receiveNote;


    public OmsOrderReturnApply() {
    }

    public OmsOrderReturnApply(Long orderId, Long productId, String orderSn, Date createTime, String memberUsername, BigDecimal returnAmount, String returnName, String returnPhone, Integer status,String productPic, String productName, String productBrand, String productAttr, Integer productCount, BigDecimal productPrice, BigDecimal productRealPrice, String reason, String description) {
        this.orderId = orderId;
        this.productId = productId;
        this.orderSn = orderSn;
        this.createTime = createTime;
        this.memberUsername = memberUsername;
        this.returnAmount = returnAmount;
        this.returnName = returnName;
        this.returnPhone = returnPhone;
        this.status = status;
        this.productPic = productPic;
        this.productName = productName;
        this.productBrand = productBrand;
        this.productAttr = productAttr;
        this.productCount = productCount;
        this.productPrice = productPrice;
        this.productRealPrice = productRealPrice;
        this.reason = reason;
        this.description = description;
    }
    public OmsOrderReturnApply(Long orderId, Long productId, String orderSn, Date createTime, String memberUsername, BigDecimal returnAmount, String returnName, String returnPhone, Integer status,String productPic, String productName, String productBrand, String productAttr, Integer productCount, BigDecimal productPrice, BigDecimal productRealPrice, String reason, String description,String proofPics) {
        this.orderId = orderId;
        this.productId = productId;
        this.orderSn = orderSn;
        this.createTime = createTime;
        this.memberUsername = memberUsername;
        this.returnAmount = returnAmount;
        this.returnName = returnName;
        this.returnPhone = returnPhone;
        this.status = status;
        this.productPic = productPic;
        this.productName = productName;
        this.productBrand = productBrand;
        this.productAttr = productAttr;
        this.productCount = productCount;
        this.productPrice = productPrice;
        this.productRealPrice = productRealPrice;
        this.reason = reason;
        this.description = description;
        this.proofPics = proofPics;
    }
}
